from common.base import Base
from common.open_browser import open_browser


# 首页操作封装

class ViewGoods(Base):
    # 定位及打印该元素文本内容，返回该元素文本内容
    def index_method1(self, locator):
        # 定位元素并打印元素文本内容
        text1 = self.get_element_text(locator)
        self.click(locator)
        return text1


if __name__ == '__main__':
    driver = open_browser()
    driver.get('http://192.168.223.135/ecshop/index.php')
    i = ViewGoods(driver)

